{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "provenance": []
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    },
    "language_info": {
      "name": "python"
    }
  },
  "cells": [
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "jnvZmhsKuVCc"
      },
      "outputs": [],
      "source": [
        "import torch\n",
        "from diffusers import StableDiffusionPipeline, DPMSolverMultistepScheduler\n",
        "\n",
        "model_id = \"stabilityai/stable-diffusion-2-1\"\n",
        "pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)\n",
        "pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)\n",
        "pipe = pipe.to(\"cuda\")\n"
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "prompt = \" hyperrealistic portrait of unicorn\"\n",
        "image = pipe(prompt).images[0]"
      ],
      "metadata": {
        "id": "ExIxX3Ziuaon"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [],
      "metadata": {
        "id": "qpZU-lgEucdI"
      },
      "execution_count": null,
      "outputs": []
    }
  ]
}